//
//  FUBackgroundView.m
//  fruitsUser
//
//  Created by sgone-1 on 15/12/15.
//  Copyright © 2015年 com.sgone. All rights reserved.
//

#import "FDBackgroundView.h"

@interface FDBackgroundView () <UIGestureRecognizerDelegate>

@end

@implementation FDBackgroundView

- (id)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = [UIColor blackColor];
        self.alpha = 0.4;
//        
//        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backToViewClick)];
//        tap.numberOfTapsRequired = 1;
//        tap.numberOfTouchesRequired = 1;
//        self.userInteractionEnabled = YES;
//        [self addGestureRecognizer:tap];
    }
    return self;
}

- (void)backToViewClick {
    if ([self.delegate respondsToSelector:@selector(cancelTheBackgroundViewClick)]) {
        [self.delegate cancelTheBackgroundViewClick];
    }
}

@end
